  <?php defined('SYSPATH') or die('No direct script access.');
  
  class Controller_Frontend_Setfrontend extends Controller_Template 
  {
      public $template = 'frontend/template_frontend';
     /*  public $user;
      public $auth_required = FALSE;
      public $auth_role 	= array('login');
      public $secure_actions     = array(); */
	 
      public function before()
      {
        parent::before();
		 
		#Open session
        $this->session= Session::instance('cookie');
 
		$admin_model = new Model_Cms_Admin;
        $settings = $admin_model->get_settings();
        
  	    if ($this->auto_render)
  	    {
  	    	// Initialize empty values
  	    	$this->template->page_description = $settings['seo_description'];
  	    	$this->template->page_keywords = $settings['seo_keywords'];
  	    	$this->template->page_title = $settings['portal_name']."::".$settings['page_title'];
  	    	$this->template->content = '';
			//$this->template->username = '';
			$this->template->footer = View::factory('frontend/footer_frontend');
			//$this->template->right = '';  
 
        }
      }
      /**
       * The after() method is called after your controller action.
       * In our template controller we override this method so that we can
       * make any last minute modifications to the template before anything
       * is rendered.
       */
	public function after()
	{
		if ($this->auto_render)
		{			
			/* $this->template->styles = array_merge( $this->template->styles, $styles );
			$this->template->scripts = array_merge( $this->template->scripts, $scripts );
			#setting username for template
			if(Auth::instance()->logged_in()!= 0)
			{
				$username = Auth::instance()->get_user()->username;
				$this->template->username = $username;
			} */
		}
		
		parent::after();
    }
  }